<div style="padding: 1em">
	<div class="search">
		<%= form_tag traffic_analytics_index_path, :method => 'get', :id => "records_search", :class=>"trafficlogger-form-container" do %>
		  <div class="trafficlogger-form-elements"><h2>LookUp</h2></div>
		  <div class="trafficlogger-form-elements">
		  	Request URI <%= text_field_tag :path_info_search, params[:path_info_search],:placeholder=>"e.g /pages/index_3" ,:class=>"trafficlogger-form-field" %>
		  	Full URI <%= text_field_tag :request_uri_search, params[:request_uri_search],:placeholder=>"e.g /pages/index_3?q=1" ,:class=>"trafficlogger-form-field" %>
		  	Method <%= text_field_tag :request_method_search, params[:request_method_search],:placeholder=>"e.g GET,POST.." ,:class=>"trafficlogger-form-field" %>
		  </div>
		  <div class="trafficlogger-form-elements">
		  	User OS <%= text_field_tag :operating_system_search, params[:operating_system_search],:placeholder=>"e.g Linux,Windows.." ,:class=>"trafficlogger-form-field" %>
		  	User Device <%= text_field_tag :device_search, params[:device_search],:placeholder=>"e.g Samsung,iPhone.." ,:class=>"trafficlogger-form-field" %>
		  	User Platform <%= text_field_tag :platform_search, params[:platform_search],:placeholder=>"e.g Chrome,IE..." ,:class=>"trafficlogger-form-field" %>
		  </div>
		  <div class="trafficlogger-form-elements">
		  	Date Range <%= text_field_tag :minimum_created_at_search, params[:minimum_created_at_search],:placeholder=>"> Date" ,:class=>"trafficlogger-form-field minimum_created_at_date" %> <%= text_field_tag :maximum_created_at_search, params[:maximum_created_at_search],:placeholder=>"< Date" ,:class=>"trafficlogger-form-field maximum_created_at_date" %>
		  </div>
		  <div class="trafficlogger-submit-container">
		    <%= submit_tag "Search", :name => nil, :class=>"trafficlogger-submit-button" %> - <%= link_to "Reset", traffic_analytics_index_path,:class=>"trafficlogger-submit-button",:style=>"text-decoration:none" %>
		  </div>
		<% end %>
	</div>
	</br>
	<div id="resultset">
		<%= render :partial=>'listings' %>
	</div>
</div>
<script>
$(document).ready(function(){
	$("#path_info_inline_search_").keyup(function() {
    if ($(this).val().length >=5)
    {
      $.get($("#records_search").attr("action"), $(this).serialize(), null, "script");
    }
    return false;
  });
	$('.minimum_created_at_date').datepicker({ dateFormat: 'dd/mm/yy' });
	$('.maximum_created_at_date').datepicker({ dateFormat: 'dd/mm/yy' });
});
</script>